package com.oa.overtime.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

import com.fasterxml.jackson.annotation.JsonFormat;

@Entity
@Table(name = "t_overtime")
@XmlRootElement
public class Overtime {
	/**
	 * 表单信息
	 */
	private Long id; // 表单ID
	private String name; // 申请加班用户的名字
	private Date createDate; // 申请表创建时间
	private Date applicationTime; // 申请的日期
	private String department; // 所在部门
	private Date beginDate; // 申请加班的开始时间
	private Date endDate; // 申请加班的结束时间
	private Float totalTime; // 申请加班的总时间
	private String reason; // 加班的原因
	private String rejectReason; // 驳回的原因
	private Date realBeginDate; // 实际开始时间
	private Date realEndDate; // 实际结束时间
	private Float realTotalTime; // 实际加班时长

	/**
	 * 工作流数据字段
	 */
	private Long userId; // 启动加班流程的用户id
	private String processInstanceId; // 加班流程实例id
	private String state; // 加班流程状态

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
	public Date getApplicationTime() {
		return applicationTime;
	}

	public String getDepartment() {
		return department;
	}

	@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
	public Date getBeginDate() {
		return beginDate;
	}

	public String getReason() {
		return reason;
	}

	@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
	public Date getEndDate() {
		return endDate;
	}

	public Float getTotalTime() {
		return totalTime;
	}

	public Long getUserId() {
		return userId;
	}

	public String getProcessInstanceId() {
		return processInstanceId;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public String getRejectReason() {
		return rejectReason;
	}

	@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GTM+8")
	public Date getRealBeginDate() {
		return realBeginDate;
	}

	@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GTM+8")
	public Date getRealEndDate() {
		return realEndDate;
	}

	public Float getRealTotalTime() {
		return realTotalTime;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public void setRejectReason(String rejectReason) {
		this.rejectReason = rejectReason;
	}

	public void setRealBeginDate(Date realBeginDate) {
		this.realBeginDate = realBeginDate;
	}

	public void setRealEndDate(Date realEndDate) {
		this.realEndDate = realEndDate;
	}

	public void setRealTotalTime(Float realTotalTime) {
		this.realTotalTime = realTotalTime;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public void setProcessInstanceId(String processInstanceId) {
		this.processInstanceId = processInstanceId;
	}

	public void setTotalTime(Float totalTime) {
		this.totalTime = totalTime;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setApplicationTime(Date applicationTime) {
		this.applicationTime = applicationTime;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

}
